package base;

public class Draw {
    private int count, lines;
    public Draw(){}
    public Draw(int count, int lines){
        this.count=count;
        this.lines=lines;
    }
    /** 直角三角形 */
    public void drawTrina() {
        for (int i = 0; i < lines; i++) {//共lines行
            for (int j = 0; j < i; j++) {//每次增加1
                System.out.print("*");
            }
            System.out.println();//换行
        }
    }
    /** 输出矩形 */
    public void drawRec(){
        for (int i = 0; i < lines; i++) {
            for (int j = 0; j < count; j++) {//每行数量固定
                System.out.print("*");
            }
            System.out.println();
        }
    }
    /** 平行四边形 */
    public void drawPra(){
        for (int i = 0; i < lines; i++) {
            for(int k=0;k<i;k++){
                System.out.print(" ");
            }
            for (int j = 0; j < count; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
    public static void main(String[] args) {
        Draw d = new Draw(5,5);
        //d.drawTrina();
       // d.drawRec();
       d.drawPra();
    }
}

